package com.honglang.module.album.service;

import java.util.Collection;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.honglang.module.album.entity.AlbumPhoto;

public interface AlbumPhotoService {
	

	/**
	 * get albumphoto entities by photo;
	 * @param photoId
	 * @return
	 */
	@Transactional(readOnly = true)
	public List<AlbumPhoto> getAlbumPhotoByPhotoId(Integer photoId);
	
	/**
	 * get albumphoto entities by album;
	 * @param albumId
	 * @return
	 */
	@Transactional(readOnly = true)
	public List<AlbumPhoto> getAlbumPhotoByAlbumId(Integer albumId);
	
	/**
	 * get a list of albumphoto  entities by album;
	 * @param albumId
	 * @return
	 */
	@Transactional(readOnly = true)
	public List<AlbumPhoto> getAlbumPhotoByAlbumIdList(List<Integer> albumIdList);
	
	
	/**
	 * delete all the ablumphotos;
	 * @param ablumPhotoColl
	 */
	@Transactional(readOnly = false)
	public void delete(Collection<AlbumPhoto> ablumPhotoColl);
	
	
	/**
	 * delete albumPhoto
	 * @param albumPhoto
	 */
	@Transactional(readOnly = false)
	public void delete(AlbumPhoto albumPhoto);
	
	/**
	 * save a albumPhoto
	 * @param albumPhoto
	 * @return
	 */
	@Transactional(readOnly = false)
	public AlbumPhoto save(AlbumPhoto  albumPhoto);
	
	
	
	/**
	 * batch save albumPhoto
	 * @param albumPhotoList
	 */
	@Transactional(readOnly = false)
	public void save(List<AlbumPhoto> albumPhotoList);
	
	
	/**
	 * get albumPhoto by Id
	 * @param albumPhotoId
	 * @return
	 */
	@Transactional(readOnly = false)
	public AlbumPhoto getById(Integer albumPhotoId);
}
